package com.eos.control.action.activity;

import java.util.List;

import com.eos.business.service.SysActivityBusinessService;
import com.eos.common.tool.ConstantTool;
import com.eos.control.action.base.AbstractBaseAction;
import com.eos.orm.mybatis.model.ActivtyMappSales;
import com.eos.orm.mybatis.model.SalesModel;
import com.eos.orm.mybatis.model.SysCombo;

public class EditModelSalesSetAction extends AbstractBaseAction {
	private static final long serialVersionUID = -5071577965226205745L;
	private Integer activtySalesId;
	private List<SysCombo> comboList;
	private List<SalesModel> salesModelList;
	private ActivtyMappSales activitySales;
	
	public void setActivtySalesId(Integer activtySalesId) {
		this.activtySalesId = activtySalesId;
	}

	public List<SysCombo> getComboList() {
		return comboList;
	}

	public List<SalesModel> getSalesModelList() {
		return salesModelList;
	}

	public ActivtyMappSales getActivitySales() {
		return activitySales;
	}

	@Override
	public String execute() {
		try {
			SysActivityBusinessService sabs = new SysActivityBusinessService();
			SalesModel saleModel = new SalesModel();
			saleModel.setStatus(ConstantTool.STATUS_OK);
			saleModel.setDealFlag(ConstantTool.DEAL_FALG_OK);
			salesModelList = sabs.getAllSalesModelExample(saleModel);
			SysCombo combo = new SysCombo();
			combo.setStatus(ConstantTool.STATUS_OK);
			combo.setDealFlag(ConstantTool.DEAL_FALG_OK);
			comboList = sabs.getAllSysComboExample(combo);

			activitySales = sabs.getActivitySalesPrimaryKey(activtySalesId);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return SUCCESS;
	}
}
